package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.entity.OTCComment;
import mn.idax.exchange.otc.entity.OTCCommentExample;
import mn.idax.exchange.otc.vo.CommentPageResultDTO;
import mn.idax.exchange.otc.vo.GetCommentPageDTO;
import mn.idax.exchange.otc.vo.UserBeCommentDTO;
import mn.idax.exchange.otc.vo.UserCommentDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface OTCCommentMapper {
    int countByExample(OTCCommentExample example);

    int deleteByExample(OTCCommentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OTCComment record);

    int insertSelective(OTCComment record);

    List<OTCComment> selectByExampleWithRowbounds(OTCCommentExample example, RowBounds rowBounds);

    List<OTCComment> selectByExample(OTCCommentExample example);

    OTCComment selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OTCComment record, @Param("example") OTCCommentExample example);

    int updateByExample(@Param("record") OTCComment record, @Param("example") OTCCommentExample example);

    int updateByPrimaryKeySelective(OTCComment record);

    int updateByPrimaryKey(OTCComment record);

    //评论分页list
    List<CommentPageResultDTO> getCommentList(GetCommentPageDTO getCommentPageDTO);
    //评论分页total
    Integer getCommentTotal(GetCommentPageDTO getCommentPageDTO);
    //评论分页用户被评论的次数
    UserCommentDTO getUserBeCommentNumbers(@Param("userId") Integer userId);
    //个人中心 我收到的所有评价
    List<UserBeCommentDTO> getOthersCommentMe(@Param("userId") Integer userId);
}